package ch07;

public class Animal {
	public void shout(){
		System.out.println("으르릉~");
	}
	public static void main(String[] args){
		Animal animal = new Animal();
		Cat cat = new Cat();
		Dog dog = new Dog();
		animal.shout();
		cat.shout();
		dog.shout();
	}
}

class Cat extends Animal{
	public void shout(){
		System.out.println("야옹야옹~");
	}
}

class Dog extends Animal{
	public void shout(){
		System.out.println("멍멍~");
	}
}